import { defineStore } from "pinia";
import { getAllSwiperAPI } from "@/http/swiperCompanyInfo/index";

// 轮播图小仓库
const useSwiperStore = defineStore("Swiper", {
  state: () => ({
    imageUrl: []
  }),
  actions: {
    async getAllSwiper() {
      const res = await getAllSwiperAPI();
      this.imageUrl = res.results.map((val:any) => val.set_value); // 使用map直接赋值
    },
  },
});
export default useSwiperStore;
